home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 4 / Gold Medal Software - Volume 4 (Gold Medal) (1994).iso / os2 / fsortd.arj / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-07-12  |  1KB  |  48 lines

  1. /* */
  2.  
  3. arg install_pathname
  4. /* say install_pathname */
  5. if install_pathname = "" then do
  6.    say 'INSTALL REQUIRES A PATHNAME PARAMETER.'
  7.    say
  8.    say '           EXAMPLE: "INSTALL C:\FSORT"      '
  9.    exit 1
  10. end
  11.  
  12. call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
  13. call SysLoadFuncs
  14.  
  15. current_directory=directory()
  16. /* say current_directory */
  17.  
  18. syssearchpath=SysSearchPath('PATH','AUTOEXEC.BAT')
  19. /* say syssearchpath */
  20. os2_drive=substr(syssearchpath,1,2)
  21.  
  22. install_drive=substr(install_pathname,1,2)
  23.  
  24. sysdriveinfo = SysDriveInfo(install_drive)
  25. parse var sysdriveinfo install_drive install_free install_total install_label
  26. /* say install_drive install_free install_total install_label */
  27. call SysSleep 1
  28.  
  29. if install_free < 500000 then
  30.    Say 'Not enough space on drive'
  31.  
  32.   If SysCreateObject("WPProgram","FSORT DOC","<WP_DESKTOP>","EXENAME=VIEW.EXE;PARAMETERS="install_pathname"\FSORT.INF","replace") then
  33.     Say 'program "FSORT FOLDER" has been created'
  34.   Else Say 'Could not create program "FSORT FOLDER"'
  35.  
  36. call SysSleep 1
  37. "MKDIR" install_pathname
  38. call SysSleep 1
  39. "COPY *.*        " install_pathname
  40. call SysSleep 1
  41.  
  42. 'config.exe' os2_drive install_pathname
  43.  
  44. say
  45. say install_pathname "HAS BEEN ADDED TO" os2_drive"\CONFIG.SYS"
  46. say "BE SURE TO REBOOT OS/2 TO PICK UP THE NEW PATHNAME."
  47.  
  48.